package com.studerb.events;

import com.studerb.model.Header;

public class HeaderEvent {
    public enum EventType {
        UPDATED, ARTICLE_DOWNLOADED
    }

    private EventType type;
    private Throwable throwable;
    private Header header;

    public HeaderEvent(EventType type) {
        this.type = type;
    }

    public HeaderEvent(EventType type, Header header) {
        this.type = type;
        this.header = header;
    }

    public HeaderEvent(EventType type, Header header, Throwable throwable) {
        this.type = type;
        this.header = header;
        this.throwable = throwable;
    }

    public Header getHeader() {
        return this.header;
    }

    public Throwable getThrowable() {
        return throwable;
    }

    public EventType getType() {
        return type;
    }

}
